<!-- 主页-报价单-查看 -->
<section id="container">
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper">
            <!--state overview end-->
            <div class="row">
                <div class="col-lg-12">

                    <div class="ptop-list">
                        <section class="panel">
                            <header class="panel-heading">
                                采购清单(关联请购单号所有采购条目)
                            </header>
                            <div class="panel-body">
                                <div id="plistogContainer" class="dlshouwen-grid-container"></div>
                                <div id="plistogToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                            </div>
                        </section>

                        <section class="panel shadbox" id="shadbox" style="display:none;">
                            <header class="panel-heading">
                                历史报价库
                                <i class="add-icon icon-eye-open"> 全部</i>
                            </header>
                            <div class="panel-body">
                                <div id="pricetlogContainer" class="dlshouwen-grid-container"></div>
                                <div id="pricetlogToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                            </div>
                        </section>

                        <section class="panel">
                            <header class="panel-heading">
                                供应商报价列表(默认显示：添加比价单时的所有供应商)
                                <i class="add-icon icon-eye-open" onclick="showAllQuote();"> 全部</i>
                            </header>
                            <div class="panel-body">
                                <div id="pricelogContainer" class="dlshouwen-grid-container"></div>
                                <div id="pricelogToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                            </div>
                        </section>

                        <section class="panel">
                            <header class="panel-heading">
                                留言备注
                            </header>
                            <div class="panel-body">
                                <div class="form-group customerForm">
                                 
                                        <textarea class="form-control" maxlength="120"  disabled ng-model="submmitData.purchaseComparisionStepEntity.purchasingMsgDis">留言测试数据</textarea>
                                  
                                </div>
                            </div>
                        </section>

                        <section class="panel">
                            <div class="panel-heading">
                                审批记录
                            </div>
                            <div class="panel-body">
                                <ul class="tp-ulst">
                                    <li>
                                        <span>人员姓名 </span><span>修改时间</span><span>处理结果</span>
                                    </li>
                                    <div ng-repeat="ss in processs">
                                        <li>
                                            <span>{{ss.USER}}</span><span>{{ss.time | date:'yyyy-MM-dd hh:mm'}}</span><span>{{getsssbbb(ss.lastStatus)}}，{{ss.msg}}</span>
                                        </li>
                                    </div>
                                </ul>
                            </div>
                        </section>
                    </div>

                    <section class="panel" id="printbox" style="display:none;">
                        <header class="panel-heading add-heading">
                            采购比价单
                            <span class="add-icon">编号：{{otherMap.pcsCode}}</span>
                        </header>
                        <div class="panel-body">
                            <table class="table table-bordered">
                                <tbody>
                                    <tr style="background:#999;color:#fff;">
                                        <td colspan="13"><strong>基本信息</strong></td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">请购单编号</td>
                                        <td colspan="4">{{buying.brCode}}</td>
                                        <td colspan="3">请购单归属项目</td>
                                        <td colspan="4">{{buying.projName}}</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">请购单申请人</td>
                                        <td colspan="4">{{buying.applicantName}}</td>
                                        <td colspan="3">请购单申请人归属部门</td>
                                        <td colspan="4">{{otherMap.applicantDepartmentName}}</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">请购单申请用途</td>
                                        <td colspan="4">{{otherMap.use}}</td>
                                        <td colspan="3">请购单归属分公司</td>
                                        <td colspan="4">{{otherMap.affiliationName}}</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">请购单总金额</td>
                                        <td colspan="11">{{otherMap.buTotal}}</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">请购申请说明</td>
                                        <td colspan="11">{{buying.applyInstruction}}</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">比价单发起人</td>
                                        <td colspan="4">{{otherMap.bijiaApplicantName}}</td>
                                        <td colspan="3">发起人工号</td>
                                        <td colspan="4">{{otherMap.bijiaApplicantId}}</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">发起人归属部门</td>
                                        <td colspan="4">{{otherMap.bijiaApplicantDepartName}}</td>
                                        <td colspan="3">申请日期</td>
                                        <td colspan="4">{{headerMap.createTime | date:'yyyy-MM-dd' }}</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">留言</td>
                                        <td colspan="11">{{headerMap.purchasingMsg}}</td>
                                    </tr>
                                    <tr style="background:#999;color:#fff;">
                                        <td colspan="13"><strong>请购明细</strong></td>
                                    </tr>
                                    <tr style="font-weight:bold;">
                                        <td>类目</td>
                                        <td>类别</td>
                                        <td colspan="2">名称</td>
                                        <td colspan="3">品名及规格</td>
                                        <td>数量</td>
                                        <td>单价</td>
                                        <td colspan="2">合计</td>
                                        <td colspan="2">备注</td>
                                    </tr>
                                    <tr ng-repeat="item in items">
                                        <td>{{item.commodityCateName}}</td>
                                        <td>{{item.commodityClassName}}</td>
                                        <td colspan="2">{{item.name}}</td>
                                        <td colspan="3">{{item.descAndSpec}}</td>
                                        <td>{{item.quantity}}</td>
                                        <td>{{item.singlePrice}}</td>
                                        <td colspan="2">{{item.estimatedAmount}}</td>
                                        <td colspan="2">{{item.remark}}</td>
                                    </tr>
                                    <tr style="background:#999;color:#fff;">
                                        <td colspan="13"><strong>供应商报价明细</strong></td>
                                    </tr>
                                    <tr style="font-weight:bold;">
                                        <td>供应商名称</td>
                                        <td>联系方式</td>

                                        <td>采购物资名称</td>
                                        <td>规格和参数</td>
                                        <td>价格说明</td>
                                        <td>数量</td>
                                        <td>总价(含税&折扣)</td>

                                        <td>交货期</td>
                                        <td>质保期</td>
                                        <td>付款方式</td>
                                        <td colspan="2">优劣势</td>
                                    </tr>
                                    <tr ng-repeat="buying in allQuote">
                                        <td>{{buying.supplierName}}</td>
                                        <td>{{buying.supplierPhone}}</td>

                                        <td>{{buying.name}}</td>
                                        <td>{{buying.specification}}</td>
                                        <td>{{buying.price}}</td>
                                        <td>{{buying.quantity}}</td>
                                        <td>{{buying.priceIncludingTax}}</td>

                                        <td>{{buying.dateOfDelivery | date:'yyyy-MM-dd'}}</td>
                                        <td>{{buying.guaranteeTime | date:'yyyy-MM-dd'}}</td>
                                        <td>{{buying.paymentMethod}}</td>
                                        <td colspan="2">{{buying.strengthsAndWeaknesses}}</td>
                                    </tr>
                                    <tr style="background:#999;color:#fff;">
                                        <td colspan="13"><strong>审批记录</strong></td>
                                    </tr>
                                    <tr style="font-weight:bold;">
                                        <td colspan="2">处理人</td>
                                        <td colspan="2">处理时间</td>
                                        <td colspan="9">处理结果</td>
                                    </tr>
                                    <tr ng-repeat="ss in processs">
                                        <td colspan="2">{{ss.USER}}</td>
                                        <td colspan="2">{{ss.time | date:'yyyy-MM-dd hh:mm'}}</td>
                                        <td colspan="9">{{getsssbbb(ss.lastStatus)}}，{{ss.msg}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </section>

                    <section class="panel">
                        <div class="panel-body">
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-primary btn-l10" id="word">导出word</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-success btn-l10" id="print">打印单据</a>
                            </p>
                        </div>
                    </section>

                    <!-- Modal -->
                    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                        aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <section class="panel">
                                    <div class="panel-heading add-heading">
                                        文件列表
                                        <i class="add-icon icon-remove" data-dismiss="modal" aria-hidden="true"></i>
                                    </div>
                                    <div class="panel-body">
                                        <p>点击 <a onclick="downLoad(this)" class="down-icon">文件名测试数据.txt</a> 下载!
                                            2018-01-02 16:55</p>
                                        <input class="fileDownloadPath" value="{{fileId}}" type="hidden" />
                                    </div>
                                    <div class="panel-bg"></div>
                                </section>
                            </div>
                            <!-- /.modal-content -->
                        </div>
                        <!-- /.modal-dialog -->
                    </div>
                    <!-- /.modal -->

                </div>
            </div>
        </section>
    </section>
    <!--main content end-->
</section>

<script type="text/javascript" src="js/supplier/supplier.js"></script>
<script src="js/proinfo/purchase/comparisionExamined.js"></script>

<!-- 打印组件 -->
<script type="text/javascript" src="assets/print/jquery.jqprint-0.3.js"></script>

<!-- 导出word组件 -->
<script type="text/javascript" src="assets/html2word/FileSaver.js"></script>
<script type="text/javascript" src="assets/html2word/jquery.wordexport.js"></script>

<script>
    $(function () {
        //打印初始化  
        $("#print").click(function () {
            $(".ptop-list").hide();
            $("#printbox").show();
            $("#printbox").jqprint();
        })
        //导出word  
        $("#word").click(function () {
            $(".ptop-list").hide();
            $("#printbox").show();
            $("#printbox").wordExport();
        })
    })
</script>